import java.io.*;

public class D827 {
	public static String cost(int pencils) {
		int dis, price;
		
		dis = pencils / 12;
		pencils %= 12;
		price = dis * 50 + pencils * 5;
		
		return (Integer.toString(price) + "\n");
	}
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input;
		int pencils;
		StringBuffer output = new StringBuffer();
		
		while((input = br.readLine()) != null) {
			pencils = Integer.parseInt(input);
			
			output.append(cost(pencils));
		}
		
		System.out.print(output);
	}
}